package bairui.international.console.web.controller.prize.nine;

import com.lianjing.sh.spring.web.controller.enhance.module.Module;
import com.lianjing.sh.spring.web.controller.enhance.module.ModuleHead;

/**
 *
 * Module_Edit
 *
 */
class Module_Edit{

	
	public Module module(
		bairui.international.model.domain.jpa.TB_Prize bean
		, 
		C_Prize_Nine_Manage_Edit.Edit.Operate c_Prize_Nine_Manage_Edit_Edit_Operate
				
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return moduleTemplate(
				bean
				, 
				c_Prize_Nine_Manage_Edit_Edit_Operate
						
				,editors
			);
	}
	
	public Module module(
		java.util.List<bairui.international.model.domain.jpa.TB_Prize> bean
		, 
		C_Prize_Nine_Manage_Edit.Edit.Operate c_Prize_Nine_Manage_Edit_Edit_Operate
				
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return moduleTemplate(
				bean
				, 
				c_Prize_Nine_Manage_Edit_Edit_Operate
						
				,editors
			);
	}
	
	
	/**
	 * 编辑模块
	 */
	private Module moduleTemplate(
		Object bean
		, 
		C_Prize_Nine_Manage_Edit.Edit.Operate c_Prize_Nine_Manage_Edit_Edit_Operate
				
		,com.lianjing.sh.spring.web.controller.enhance.input.InputModelContextMethodInfoEditor ... editors
		
	){
		return
			new Module(
					new ModuleHead("编辑")
					, 
					new com.lianjing.sh.spring.web.controller.enhance.module.body.EditModuleBody(
							bean, 
							Model.class,
							c_Prize_Nine_Manage_Edit_Edit_Operate, 
							Relation.relations(
								)
							,editors
						)
				);
	}
	
	/**
	 * 输入模型
	 */
	static public class Models {
		private @lombok.Getter @lombok.Setter java.util.List<Model> models = new java.util.ArrayList<>();
	}
	
	@org.springframework.stereotype.Component("bairui.international.console.web.controller.prize.nine.Module_Edit$Model")
	
	static public class Model
	
	 extends bairui.international.model.domain.jpa.TB_Prize
	
	 implements 
	
		com.lianjing.sh.spring.web.controller.enhance.input.InputModelable
	
	{
	
	
	
		/**
	
		 * 默认构造函数
	
		 */
	
		public Model(){}
	
	
	
		/**
	
		 * 构造函数
	
		 */
	
		public Model(
	
			bairui.international.model.domain.jpa.TB_Prize bean
	
		){
	
			if(null != bean){
	
				this.setTitle(bean.getTitle());
	
				this.setFinishTime(bean.getFinishTime());
	
				this.setOrderValue(bean.getOrderValue());
	
				this.setFileUrl(bean.getFileUrl());
	
				this.setContent(bean.getContent());
	
			}
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("标题")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(1001)
	
		@org.hibernate.validator.constraints.NotBlank
	
		@javax.validation.constraints.Size(min=0, max=100)
	
		@Override
	
		public String getTitle() {
	
			return (String)super.getTitle();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("计划结束时间")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(2001)
	
		@javax.validation.constraints.NotNull
	
		@org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd")
	
		@com.fasterxml.jackson.annotation.JsonFormat(pattern="yyyy-MM-dd")
	
		@Override
	
		public java.util.Date getFinishTime() {
	
			return (java.util.Date)super.getFinishTime();
	
		}
	
		
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("排序值")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(3001)
	
		@javax.validation.constraints.NotNull
	
		@javax.validation.constraints.Max(Integer.MAX_VALUE)
	
		@javax.validation.constraints.Min(Integer.MIN_VALUE)
	
		@Override
	
		public Integer getOrderValue() {
	
			return (Integer)super.getOrderValue();
	
		}
	
		
	
	
	
	
	
		/**
	
		 * 文件属性
	
		 */
	
		private org.springframework.web.multipart.MultipartFile fileUrlFile;
	
		
	
		/**
	
		 * 文件方法
	
		 */
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(4001)
	
		@com.lianjing.sh.model.common.annotation.Comment("背景图片")
	
		
	
		@com.lianjing.sh.validate.file.FileMax(value=10, units=com.lianjing.sh.validate.file.enums.Units.MB)
	
		@com.lianjing.sh.validate.file.FileMin(value=100, units=com.lianjing.sh.validate.file.enums.Units.B)
	
		@com.lianjing.sh.validate.file.FileType(extension={"bmp","png","jpg","jpeg"})
	
		@com.lianjing.sh.validate.file.Image
	
		public org.springframework.web.multipart.MultipartFile getFileUrlFile() {
	
			return this.fileUrlFile;
	
		}
	
		public void setFileUrlFile(org.springframework.web.multipart.MultipartFile fileUrlFile) {
	
			this.fileUrlFile = fileUrlFile;
	
		}
	
	
	
		@com.lianjing.sh.model.common.annotation.Comment("说明")
	
		@com.sh_lianjing.reflect.method.annotation.MethodOrder(5001)
	
		@javax.validation.constraints.Size(min=0, max=20000)
	
		@com.lianjing.sh.validate.generic.Editor
	
		@Override
	
		public String getContent() {
	
			return (String)super.getContent();
	
		}
	
		
	
	
	
		/**
	
		 * 非继承属性
	
		 */
	
	
	
		/**
	
		 * 得到输入属性
	
		 */
	
		/** 得到标题 */
	
		public String gainTitle() {
	
			return this.getTitle();
	
		}
	
		/** 得到计划结束时间 */
	
		public java.util.Date gainFinishTime() {
	
			return this.getFinishTime();
	
		}
	
		/** 得到排序值 */
	
		public Integer gainOrderValue() {
	
			return this.getOrderValue();
	
		}
	
		/** 得到背景图片 */
	
		public org.springframework.web.multipart.MultipartFile gainFileUrlFile() {
	
			return this.getFileUrlFile();
	
		}
	
		/** 得到说明 */
	
		public String gainContent() {
	
			return this.getContent();
	
		}
	
	
	
		/**
	
		 * 转换到表单数据格式
	
		 */
	
		public java.util.Map<String, String> toFormData() throws com.sh_lianjing.serialize.json.jackson.exception.JsonException{
	
			return com.lianjing.sh.web.common.util.Util_Form.beanToFormDataFormat(this);
	
		}
	
	
	
	}
	
	
	
	static public class Relation
	{
		public static java.util.Map<String, java.util.List<?>> relations(
		){
			java.util.Map<String, java.util.List<?>> map = new java.util.HashMap<>();
			return map;
		}
	}
	
	
	
	/**
	 * 输出模型
	 */
	

}
